const db = require('../DBcofig/DBConnection')
module.exports = {
    getlivePeo(req, res) {
        let sql = "select * from hospeople"
        let arr = []
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data
                })
            }
        })
    },
    getBindNumPeo(req, res) {
        let sql = "select * from bindnum"
        let arr = []
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data
                })
            }
        })
    },
    getBindNumPeoMsg(req, res) {
        let { id } = req.query
        console.log(req.query)
        let sql = 'select * from uni_peomsg where uni_peoid = ?'
        let arr = [id]
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data
                })
            }
        })

    }

}